/*
 * Created on Mar 4, 2004
 */
package com.scalar.chiptrack.operations.packingslip;

import java.util.ArrayList;

import org.apache.struts.util.LabelValueBean;

import com.scalar.ScalarException;

/**
 * @author Ravikanth
**/
public class CustomerShippingLineItems
{
	private int lineItemId = -1;
	private int customerShippingLineItemId = -1;
	private int qtyToShip = 0;
	private int salesOrder_ID = -1;
	private int product_ID = -1;
	private int cool_Qty = 0;
	private int qty_Available = 0;
	private int lineitemNumber = 0;
	private int cool_PO_Line_Item_No = -1;
	private int qtyPulled = 0;
	private int orginalQtyPulled = 0;

	private String part_Number = null;
	private String mkt_Part_Number = null;
	private String customer_Part_Number = null;
	private String cool_Status = null;
	private String cool_Description = null;
	private String cool_Requested_Date = null;
	private String cool_Booking_Date = null;
	private String cool_Sugg_Schedule_Date_With_Substitutables = null;
	private String cool_Sugg_Schedule_Date_Without_Substitutables = null;
	private String cool_Schedule_Date = null;
	private String cool_Revised_Date = null;
	private String units = null;
	private String softwareVersion = null;
	private String scheduleNumber = null;

	private boolean cool_Is_Cancel = false;
	private boolean cool_Taxable = false;

	private float cool_Unit_Cost = 0.0f;
	private float cool_Amount = 0.0f;

    //Start  Here Added by Krishna Prasad on May 31 2004
    private int  unitsPTrays = 0;
    private int  traysPInnerBoxes = 0;
    private int  innerPOuterBoxes = 0;
    private String  totalTrays = "";
    private String  totalInnerBoxes = "";
    private String  totalOuterBoxes = "";
    private String  rrmmcc = null;
    private String  msLevel = null;
    private String  safeHours = null;
    private String  sealDate = null;
    private String  madeInCountry = null;
    private String parentPartNumber = null;
    private String hiddenQtyPulled = null;
    private String inventoryPulled = null;
	private String[] shipped_Part_Number = null;
	private ArrayList innerAndOuterBoxList = null;
	private ArrayList substitutablePartNumbers = new ArrayList();
    private String customer_Label_Number = null; // Added by Krishna Prasad on 23 Nov 2004
    private String odm_Part_Number = null;
    private ArrayList qtyPulledSubstitutablePartNo = new ArrayList();
    private String[] substitute_Part_Number = null;
    private boolean dropShippment = false;
    private String cartonNumber = null;
    //Ends Here

    // Variables for WebLs
    private String category 		= null;
    private String startMacAddress 	= null;
    private String endMacAddress 	= null;
    private String lineItemUrl 		= null;
    private String lineItemError    = null;
    private String lineItemStatus    = null;

	public CustomerShippingLineItems(){}

    //Start  Here Added by Krishna Prasad on May 31 2004

    public String getHiddenQtyPulled() {
        return hiddenQtyPulled;
    }

    public void setHiddenQtyPulled(String hiddenQtyPulled) {
        this.hiddenQtyPulled = hiddenQtyPulled;
    }

    public String getInventoryPulled() {
        return inventoryPulled;
    }

    public void setInventoryPulled(String inventoryPulled) {
        this.inventoryPulled = inventoryPulled;
    }

    public String getParentPartNumber() {
        return parentPartNumber;
    }

    public void setParentPartNumber(String parentPartNumber) {
        this.parentPartNumber = parentPartNumber;
    }

    public ArrayList getSubstitutablePartNumbers() {
        return substitutablePartNumbers;
    }

    public void setSubstitutablePartNumbers(ArrayList substitutablePartNumbers) {
        this.substitutablePartNumbers = substitutablePartNumbers;
    }

    public String[] getShipped_Part_Number() {
        return shipped_Part_Number;
    }

    public void setShipped_Part_Number(String[] shipped_Part_Number) {
        this.shipped_Part_Number = shipped_Part_Number;
    }

    public int getUnitsPTrays() {
        return unitsPTrays;
    }

    public void setUnitsPTrays(int unitsPTrays) {
        this.unitsPTrays = unitsPTrays;
    }

    public int getTraysPInnerBoxes() {
        return traysPInnerBoxes;
    }

    public void setTraysPInnerBoxes(int traysPInnerBoxes) {
        this.traysPInnerBoxes = traysPInnerBoxes;
    }

    public int getInnerPOuterBoxes() {
        return innerPOuterBoxes;
    }

    public void setInnerPOuterBoxes(int innerPOuterBoxes) {
        this.innerPOuterBoxes = innerPOuterBoxes;
    }

    public String getTotalTrays() {
        return totalTrays;
    }

    public void setTotalTrays(String totalTrays) {
        this.totalTrays = totalTrays;
    }

    public String getTotalInnerBoxes() {
        return totalInnerBoxes;
    }

    public void setTotalInnerBoxes(String totalInnerBoxes) {
        this.totalInnerBoxes = totalInnerBoxes;
    }

    public String getTotalOuterBoxes() {
        return totalOuterBoxes;
    }

    public void setTotalOuterBoxes(String totalOuterBoxes) {
        this.totalOuterBoxes = totalOuterBoxes;
    }

    public ArrayList getInnerAndOuterBoxList() {
        return innerAndOuterBoxList;
    }

    public void setInnerAndOuterBoxList(ArrayList innerAndOuterBoxList) {
        this.innerAndOuterBoxList = innerAndOuterBoxList;
    }

    public String getRrmmcc() {
        return rrmmcc;
    }

    public void setRrmmcc(String rrmmcc) {
        this.rrmmcc = rrmmcc;
    }

    public String getMsLevel() {
        return msLevel;
    }

    public void setMsLevel(String msLevel) {
        this.msLevel = msLevel;
    }

    public String getSafeHours() {
        return safeHours;
    }

    public void setSafeHours(String safeHours) {
        this.safeHours = safeHours;
    }

    public String getSealDate() {
        return sealDate;
    }

    public void setSealDate(String sealDate) {
        this.sealDate = sealDate;
    }

    public String getMadeInCountry() {
        return madeInCountry;
    }

    public void setMadeInCountry(String madeInCountry) {
        this.madeInCountry = madeInCountry;
    }

    //end Here
    public float getCool_Amount()
    {
        return cool_Amount;
    }

    public String getCool_Booking_Date()
    {
        return cool_Booking_Date;
    }

    public String getCool_Description()
    {
        return cool_Description;
    }

    public boolean isCool_Is_Cancel()
    {
        return cool_Is_Cancel;
    }

    public int getCool_PO_Line_Item_No()
    {
        return cool_PO_Line_Item_No;
    }

    public int getCool_Qty()
    {
        return cool_Qty;
    }

    public String getCool_Requested_Date()
    {
        return cool_Requested_Date;
    }

    public String getCool_Revised_Date()
    {
        return cool_Revised_Date;
    }

    public String getCool_Schedule_Date()
    {
        return cool_Schedule_Date;
    }

    public String getCool_Status()
    {
        return cool_Status;
    }

    public String getCool_Sugg_Schedule_Date_With_Substitutables()
    {
        return cool_Sugg_Schedule_Date_With_Substitutables;
    }

    public String getCool_Sugg_Schedule_Date_Without_Substitutables()
    {
        return cool_Sugg_Schedule_Date_Without_Substitutables;
    }

    public boolean isCool_Taxable()
    {
        return cool_Taxable;
    }

    public float getCool_Unit_Cost()
    {
        return cool_Unit_Cost;
    }

    public String getCustomer_Part_Number()
    {
        return customer_Part_Number;
    }

    public int getLineItemId()
    {
        return lineItemId;
    }

    public String getMkt_Part_Number()
    {
        return mkt_Part_Number;
    }

    public String getPart_Number()
    {
        return part_Number;
    }

    public int getProduct_ID()
    {
        return product_ID;
    }

    public int getQty_Available()
    {
        return qty_Available;
    }

    public int getQtyToShip()
    {
        return qtyToShip;
    }

    public int getSalesOrder_ID()
    {
        return salesOrder_ID;
    }

    public void setCool_Amount(float f)
    {
        cool_Amount = f;
    }

    public void setCool_Booking_Date(String string)
    {
        cool_Booking_Date = string;
    }

    public void setCool_Description(String string)
    {
        cool_Description = string;
    }

    public void setCool_Is_Cancel(boolean b)
    {
        cool_Is_Cancel = b;
    }

    public void setCool_PO_Line_Item_No(int i)
    {
        cool_PO_Line_Item_No = i;
    }

    public void setCool_Qty(int i)
    {
        cool_Qty = i;
    }

    public void setCool_Requested_Date(String string)
    {
        cool_Requested_Date = string;
    }

    public void setCool_Revised_Date(String string)
    {
        cool_Revised_Date = string;
    }

    public void setCool_Schedule_Date(String string)
    {
        cool_Schedule_Date = string;
    }

    public void setCool_Status(String string)
    {
        cool_Status = string;
    }

    public void setCool_Sugg_Schedule_Date_With_Substitutables(String string)
    {
        cool_Sugg_Schedule_Date_With_Substitutables = string;
    }

    public void setCool_Sugg_Schedule_Date_Without_Substitutables(String string)
    {
        cool_Sugg_Schedule_Date_Without_Substitutables = string;
    }

    public void setCool_Taxable(boolean b)
    {
        cool_Taxable = b;
    }

    public void setCool_Unit_Cost(float f)
    {
        cool_Unit_Cost = f;
    }

    public void setCustomer_Part_Number(String string)
    {
        customer_Part_Number = string;
    }

    public void setLineItemId(int i)
    {
        lineItemId = i;
    }

    public void setMkt_Part_Number(String string)
    {
        mkt_Part_Number = string;
    }

    public void setPart_Number(String string)
    {
        part_Number = string;
    }

    public void setProduct_ID(int i)
    {
        product_ID = i;
    }

    public void setQty_Available(int i)
    {
        qty_Available = i;
    }

    public void setQtyToShip(int i)
    {
        qtyToShip = i;
    }

    public void setSalesOrder_ID(int i)
    {
        salesOrder_ID = i;
    }

    public int getQtyPulled()
    {
        return qtyPulled;
    }

    public String getUnits()
    {
        return units;
    }

    public void setQtyPulled(int i)
    {
        qtyPulled = i;
    }

    public void setUnits(String string)
    {
        units = string;
    }

    public int getLineitemNumber()
    {
        return lineitemNumber;
    }

    public void setLineitemNumber(int i)
    {
        lineitemNumber = i;
    }

    public int getOrginalQtyPulled()
    {
        return orginalQtyPulled;
    }

    public void setOrginalQtyPulled(int i)
    {
        orginalQtyPulled = i;
    }

    public int getCustomerShippingLineItemId()
    {
        return customerShippingLineItemId;
    }

    public void setCustomerShippingLineItemId(int i)
    {
        customerShippingLineItemId = i;
    }

    public String getScheduleNumber()
    {
        return scheduleNumber;
    }

    public String getSoftwareVersion()
    {
        return softwareVersion;
    }

    public void setScheduleNumber(String string)
    {
        scheduleNumber = string;
    }

    public void setSoftwareVersion(String string)
    {
        softwareVersion = string;
    }

    public String getSubstitutablePartNumbersAsString() throws ScalarException
    {
		return getSubstitutablePartNumbersAsString( "<br>" );
    }

    public String getSubstitutablePartNumbersAsString ( String delimiter ) throws ScalarException
    {

		String       shippedPartNo = null;
        StringBuffer shippedPartNo1 = new StringBuffer();
        String       shippedPartNo2 = null;
        LabelValueBean lvb = null;

		try
        {
            if ( substitutablePartNumbers != null )
            {
                for( int k = 0 ; k < substitutablePartNumbers.size() ; k++ )
                {
                    lvb =  (LabelValueBean) substitutablePartNumbers.get( k );
                    //shippedPartNo = (String) substitutablePartNumbers.get( k );
                    shippedPartNo = lvb.getLabel();
                    if( shippedPartNo != null && shippedPartNo.trim().length() > 0  )
                    {
                        shippedPartNo1.append( shippedPartNo);

                        if(delimiter != null && delimiter.trim().length() > 0 )
                        {
                            shippedPartNo1.append( delimiter );
                        }
                        else
                        {
                            shippedPartNo1.append( "\n" );
                        }
                    }
                    shippedPartNo = "";
                }
            }
            if(shippedPartNo1 != null && shippedPartNo1.toString().trim().length() > 0 )
            {
                if(delimiter != null && delimiter.trim().length() > 0 )
                {
                    shippedPartNo2 = shippedPartNo1.substring ( 0 , shippedPartNo1.toString().trim().length() - delimiter.length() );
                }
                else
                {
                    shippedPartNo2 = shippedPartNo1.substring ( 0 , shippedPartNo1.toString().trim().length() );
                }
            }
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}

		return shippedPartNo2;
	}

    public String getVSubstitutablePartNumbersAsTable() throws ScalarException
    {
		String       shippedPartNo1     = null;
        StringBuffer shippedPartNo2     = new StringBuffer();
        String[]     partNumberList     = null;
        int          partNumberCount    = 0;
        partNumberList = convertArrayListIntoStringArray( substitutablePartNumbers );
 		try
        {
            shippedPartNo2.append("<Table border='0' class='NArialL' cellspacing='0' cellpadding='0'>");

            if ( partNumberList != null )
            {
                for( int k = 0 ; k < partNumberList.length ; k++ )
                {
                    shippedPartNo1 = (String) partNumberList[k];
                    if( shippedPartNo1 != null && shippedPartNo1.trim().length() > 0 )
                    {
                        shippedPartNo2.append("<TR><TD class='NArialL'>&nbsp;" + shippedPartNo1 + "</TD></TR>");
                        partNumberCount ++;
                    }
                    shippedPartNo1 = null;
                }
            }
            if ( partNumberCount == 0 )
            {
                shippedPartNo2.append("<TR><TD class='NArialL'>&nbsp;" + part_Number + "</TD></TR>");
            }
            shippedPartNo2.append("</Table>");
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}
		return shippedPartNo2.toString();
    }

    public String getVSubstitutablePartNumbersResultAsTable() throws ScalarException
    {
        String       PartNo             = null;
		String       shippedPartNo1     = null;
        StringBuffer shippedPartNo2     = new StringBuffer();
        boolean      matched            = false;
        String[]     partNumberList1    = null;
        ArrayList    partNumberList2    = null;
        int          partNumberCount    = 0;

        partNumberList1  = convertArrayListIntoStringArray ( substitutablePartNumbers );
        partNumberList2  = convertStringArrayIntoArrayList ( shipped_Part_Number ) ;

		try
        {
            shippedPartNo2.append("<Table border='0' class='NArialL' cellspacing='0' cellpadding='0'>");
            if( partNumberList1 != null )
            {
                for( int k = 0 ; k < partNumberList1.length ; k++ )
                {
                    shippedPartNo1 = (String) partNumberList1[k];
                    if( partNumberList2 != null )
                    {
                        for( int i = 0 ; i < partNumberList2.size() ; i++ )
                        {
                            PartNo = (String) partNumberList2.get(i);
                            if( shippedPartNo1 != null && PartNo != null && PartNo.equalsIgnoreCase(shippedPartNo1)  && ! part_Number.equalsIgnoreCase( PartNo ) )
                            {
                                shippedPartNo2.append("<TR><TD class='NArialL'>Allowed</TD></TR>");
                                matched = true;
                                partNumberCount ++;
                                break;
                            }
                        }
                    }
                    if( matched == false )
                    {
                        shippedPartNo2.append("<TR><TD class='NArialL'>Not Allowed</TD></TR>");
                        partNumberCount ++;
                    }
                    PartNo = null ;
                    shippedPartNo1 = null;
                    matched = false;
                }
            }
            if ( partNumberCount == 0 )
            {
                shippedPartNo2.append("<TR><TD class='NArialL'>Allowed</TD></TR>");
            }
            shippedPartNo2.append("</Table>");
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}
		return shippedPartNo2.toString();
    }

    public String getSubstitutablePartNumbersAsTable() throws ScalarException
    {
        String       PartNo             = null;
		String       shippedPartNo1     = null;
        StringBuffer shippedPartNo2     = new StringBuffer();
        String[]     partNumberList     = null;

        if( isDropShippment() )
            partNumberList = convertArrayListIntoStringArray( substitutablePartNumbers );
        else
            partNumberList = shipped_Part_Number;

		try
        {
            shippedPartNo2.append("<Table border='0' class='NArialRS' cellspacing='0' cellpadding='0'>");

            if ( partNumberList != null )
            {
                for( int k = 0 ; k < partNumberList.length ; k++ )
                {
                    shippedPartNo1 = (String) partNumberList[k];
                    if( shippedPartNo1 != null && shippedPartNo1.trim().length() > 0 )
                    {
                        shippedPartNo2.append("<TR><TD>&nbsp;" + shippedPartNo1 + "</TD></TR>");
                    }
                    shippedPartNo1 = null;
                }
            }
            shippedPartNo2.append("</Table>");
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}
		return shippedPartNo2.toString();
    }

    public String getSubstitutablePartNumbersResultAsTable() throws ScalarException
    {
        String       PartNo             = null;
		String       shippedPartNo1     = null;
        StringBuffer shippedPartNo2     = new StringBuffer();
        boolean      matched            = false;
        String[]     partNumberList1    = null;
        ArrayList    partNumberList2    = null;
        String       resultStr1         = "";
        String       resultStr2         = "";

        if( isDropShippment() == true && qtyPulledSubstitutablePartNo != null && qtyPulledSubstitutablePartNo.size() == 0)
        {
            resultStr1      = "Allowed";
            resultStr2      = "Not Allowed";
        }
        else
        {
            resultStr1      = "Yes";
            resultStr2      = "No";
        }
        if( isDropShippment() && qtyPulledSubstitutablePartNo != null && qtyPulledSubstitutablePartNo.size() == 0 )
        {
            partNumberList1  = convertArrayListIntoStringArray ( substitutablePartNumbers );
            partNumberList2  = convertStringArrayIntoArrayList ( shipped_Part_Number ) ;
        }
        else if( isDropShippment()  && qtyPulledSubstitutablePartNo != null && qtyPulledSubstitutablePartNo.size() > 0 )
        {
            partNumberList1  = convertArrayListIntoStringArray ( substitutablePartNumbers );
            partNumberList2  = qtyPulledSubstitutablePartNo;
        }
        else
        {
            partNumberList1  = shipped_Part_Number;
            partNumberList2  = qtyPulledSubstitutablePartNo;
        }
		try
        {
            shippedPartNo2.append("<Table border='0' class='NArialRS' cellspacing='0' cellpadding='0'>");
            if( partNumberList1 != null )
            {
                for( int k = 0 ; k < partNumberList1.length ; k++ )
                {
                    shippedPartNo1 = (String) partNumberList1[k];
                    if( partNumberList2 != null )
                    {
                        for( int i = 0 ; i < partNumberList2.size() ; i++ )
                        {
                            PartNo = (String) partNumberList2.get(i);
                            if( shippedPartNo1 != null && PartNo != null && PartNo.equalsIgnoreCase(shippedPartNo1)  && ! part_Number.equalsIgnoreCase( PartNo ) )
                            {
                                shippedPartNo2.append("<TR><TD>" + resultStr1 + "</TD></TR>");
                                matched = true;
                                break;
                            }
                        }
                    }
                    if( matched == false )
                    {
                        shippedPartNo2.append("<TR><TD>" + resultStr2 + "</TD></TR>");
                    }
                    PartNo = null ;
                    shippedPartNo1 = null;
                    matched = false;
                }
            }
            shippedPartNo2.append("</Table>");
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}
		return shippedPartNo2.toString();
    }

    public String getSubstitutablePartNumbersAsXML() throws ScalarException
    {
		String       shippedPartNo1     = null;
        StringBuffer shippedPartNo2     = new StringBuffer();
        String[]     partNumberList     = null;

        if( isDropShippment() )
            partNumberList = convertArrayListIntoStringArray( substitutablePartNumbers );
        else
            partNumberList = shipped_Part_Number;

		try
        {
            if ( partNumberList != null )
            {
                for( int k = 0 ; k < partNumberList.length ; k++ )
                {
                    shippedPartNo1 = (String) partNumberList[k];
                    if( shippedPartNo1 != null && shippedPartNo1.trim().length() > 0 )
                    {
                        shippedPartNo2.append("<SKU><SKUPartNumber><![CDATA[" + shippedPartNo1 + "]]></SKUPartNumber></SKU>");
                    }
                    shippedPartNo1 = null;
                }
            }
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}
		return shippedPartNo2.toString();
    }

    public String getSubstitutablePartNumbersResultAsXML() throws ScalarException
    {
        String       PartNo             = null;
		String       shippedPartNo1     = null;
        StringBuffer shippedPartNo2     = new StringBuffer();
        boolean      matched            = false;
        String[]     partNumberList1    = null;
        ArrayList    partNumberList2    = null;
        String       resultStr1         = "";
        String       resultStr2         = "";

        if( isDropShippment() == true && qtyPulledSubstitutablePartNo != null && qtyPulledSubstitutablePartNo.size() == 0)
        {
            resultStr1      = "Allowed";
            resultStr2      = "Not Allowed";
        }
        else
        {
            resultStr1      = "Yes";
            resultStr2      = "No";
        }
        if( isDropShippment() && qtyPulledSubstitutablePartNo != null && qtyPulledSubstitutablePartNo.size() == 0 )
        {
            partNumberList1  = convertArrayListIntoStringArray ( substitutablePartNumbers );
            partNumberList2  = convertStringArrayIntoArrayList ( shipped_Part_Number ) ;
        }
        else if( isDropShippment()  && qtyPulledSubstitutablePartNo != null && qtyPulledSubstitutablePartNo.size() > 0 )
        {
            partNumberList1  = convertArrayListIntoStringArray ( substitutablePartNumbers );
            partNumberList2  = qtyPulledSubstitutablePartNo;
        }
        else
        {
            partNumberList1  = shipped_Part_Number;
            partNumberList2  = qtyPulledSubstitutablePartNo;
        }
		try
        {
            if( partNumberList1 != null )
            {
                for( int k = 0 ; k < partNumberList1.length ; k++ )
                {
                    shippedPartNo1 = (String) partNumberList1[k];
                    if( partNumberList2 != null )
                    {
                        for( int i = 0 ; i < partNumberList2.size() ; i++ )
                        {
                            PartNo = (String) partNumberList2.get(i);
                            if( shippedPartNo1 != null && PartNo != null && PartNo.equalsIgnoreCase(shippedPartNo1)  && ! part_Number.equalsIgnoreCase( PartNo ) )
                            {
                                shippedPartNo2.append("<SKU><Result><![CDATA[" + resultStr1 + "]]></Result></SKU>");
                                matched = true;
                                break;
                            }
                        }
                    }
                    if( matched == false )
                    {
                        shippedPartNo2.append("<SKU><Result><![CDATA[" + resultStr2 + "]]></Result></SKU>");
                    }
                    PartNo = null ;
                    shippedPartNo1 = null;
                    matched = false;
                }
            }
		}
		catch (Exception e) {
			throw new ScalarException ("Could not parse the Shipped Part Numbers from database", e);
		}
		return shippedPartNo2.toString();
    }

    public String[] convertArrayListIntoStringArray ( ArrayList sourceList ) /*throws ScalarException*/
    {
		String shippedPartNo    = null;
        LabelValueBean lvb      = null;
        String[] outputList     = null;
        if ( sourceList != null && sourceList.size() > 0 )
        {
            outputList = new String[ sourceList.size() ];
            for( int k = 0 ; k < sourceList.size() ; k++ )
            {
                lvb =  (LabelValueBean) sourceList.get( k );
                shippedPartNo = lvb.getLabel();
                if( shippedPartNo != null && shippedPartNo.trim().length() > 0  )
                {
                    outputList[k] = shippedPartNo;
                }
                shippedPartNo = "";
            }
        }
        if( outputList == null )
        {
            outputList = new String[]{};
        }
		return outputList;
	}

    public ArrayList convertStringArrayIntoArrayList ( String[] sourceList )
    {
		String    shippedPartNo = null;
        ArrayList outputList    = null;
        if ( sourceList != null && sourceList.length > 0 )
        {
            outputList = new ArrayList();
            for( int k = 0 ; k < sourceList.length ; k++ )
            {
                shippedPartNo =  sourceList[k];
                if( shippedPartNo != null && shippedPartNo.trim().length() > 0  )
                {
                    outputList.add( shippedPartNo );
                }
                shippedPartNo = "";
            }
        }
		return outputList;
	}


	/**
	 * @return
	 */
	public String getCategory()
	{
		return category;
	}

	/**
	 * @return
	 */
	public String getEndMacAddress()
	{
		return endMacAddress;
	}

	/**
	 * @return
	 */
	public String getStartMacAddress()
	{
		return startMacAddress;
	}

	/**
	 * @param string
	 */
	public void setCategory(String string)
	{
		category = string;
	}

	/**
	 * @param string
	 */
	public void setEndMacAddress(String string)
	{
		endMacAddress = string;
	}

	/**
	 * @param string
	 */
	public void setStartMacAddress(String string)
	{
		startMacAddress = string;
	}

	/**
	 * @return
	 */
	public String getLineItemUrl()
	{
		return lineItemUrl;
	}

    public String getLineItemFormattedUrl()
    {
        String tempStr = "";
        if( lineItemUrl != null && lineItemUrl.trim().length()>0)
        {
            for ( int i=0; i< lineItemUrl.length(); i++)
            {
                if(((i+1)%35) == 0 )
                {
                    tempStr = tempStr+"<br>";
                    tempStr = tempStr+lineItemUrl.substring(i,i+1);
                }
                else
                {
                    tempStr = tempStr+lineItemUrl.substring(i,i+1);
                }
            }
        }
        return tempStr;
    }

	/**
	 * @param string
	 */
	public void setLineItemUrl(String string)
	{
		lineItemUrl = string;
	}

    public String getLineItemError() {
        return lineItemError;
    }

    public void setLineItemError(String lineItemError) {
        this.lineItemError = lineItemError;
    }

    public String getLineItemStatus() {
        return lineItemStatus;
    }

    public void setLineItemStatus(String lineItemStatus) {
        this.lineItemStatus = lineItemStatus;
    }

    public String getCustomer_Label_Number()
    {
        return customer_Label_Number;
    }

    public void setCustomer_Label_Number(String customer_Label_Number)
    {
        this.customer_Label_Number = customer_Label_Number;
    }

    public String getOdm_Part_Number() {
        if( odm_Part_Number == null )
        {
            odm_Part_Number = "";
        }
        return odm_Part_Number;
    }

    public void setOdm_Part_Number(String odm_Part_Number) {
        this.odm_Part_Number = odm_Part_Number;
    }

    public ArrayList getQtyPulledSubstitutablePartNo()
    {
        return qtyPulledSubstitutablePartNo;
    }

    public void setQtyPulledSubstitutablePartNo(ArrayList qtyPulledSubstitutablePartNo)
    {
        this.qtyPulledSubstitutablePartNo = qtyPulledSubstitutablePartNo;
    }

    public String[] getSubstitute_Part_Number() {
        return substitute_Part_Number;
    }

    public void setSubstitute_Part_Number(String[] substitute_Part_Number) {
        this.substitute_Part_Number = substitute_Part_Number;
    }

    public boolean isDropShippment() {
        return dropShippment;
    }

    public void setDropShippment(boolean dropShippment) {
        this.dropShippment = dropShippment;
    }

    public String getCartonNumber() {
        return cartonNumber;
    }

    public void setCartonNumber(String cartonNumber) {
        this.cartonNumber = cartonNumber;
    }
}
